[][src]Crate cl_traits

Collection Traits (cl-traits)

Many data structures have unique features that make it difficult or even impossible to create a single trait that fits all. This crate tries to circumvent such behaviour by providing a single method for each trait to achieve maximum flexibility and freedom.

Modules

doc_tests

Instances for documentation tests

Macros

create_and_impl_marker_trait

Creates a marker trait $trait_name with or without bounds.

create_marker_trait

Creates a marker trait $trait_name with or without bounds.

Structs

ArrayWrapper

With const-generics feature, wraps an arbitrary length array. Otherwise, wraps an array with a selected number of elements. Necessary for third-party and std implementations.

Traits

Array

This is my array trait. There are many like it, but this one is mine.

Capacity

See capacity for more information.

Clear

See clear for more information.

Insert

See insert for more information.

Length

See length for more information.

Push

See push for more information.

Remove

See remove for more information.

Retain

See retain for more information.

Storage

Storage is anything that can hold a collection of items

Swap

See Swap for more information.

Truncate

See Truncate for more information.

WithCapacity

See with_capacity for more information.

Functions

create_array

Creates an array [T; N] where each array element T is returned by the cb call.

create_array_rslt

Creates an falible array [T; N] where each array element T is returned by the cb call.